﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Principal.Master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="MakeIT.Deo.Apresentacao.Default" %>

<%@ Register Assembly="UOL.PagSeguro" Namespace="UOL.PagSeguro" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/Noticias.ascx" TagName="Noticias" TagPrefix="uc1" %>
<%@ Register Src="~/Categorias.ascx" TagName="Categorias" TagPrefix="uc2" %>
<%@ Register Src="~/Destaques.ascx" TagName="Destaques" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="App_Themes/Padrao/prototype.js"></script>
    <script type="text/javascript" src="App_Themes/Padrao/cluster.js"></script>
    <script type="text/javascript" src="App_Themes/Padrao/scriptaculous.js?load=effects,controls,slider"></script>
    <style type="text/css">
        /*
 * MAIN CAPSULE ROTATION
 */
        
        .main_cluster_content
        {
            position: relative;
            width: 600px;
            height: 250px;
            overflow: hidden;
        }
        
        .main_cluster_content .cluster_capsule
        {
            width: 600px;
            height: 250px;
        }
        
        .main_cluster_content img.cluster_capsule_image
        {
            width: 600px;
            height: 250px;
            position: relative;
        }
        
        .cluster_control_left, .cluster_control_right
        {
            position: absolute;
            top: 230px;
            height: 14px;
            color: #ffffff;
            background-color: #a0a0a0;
            padding: 6px;
            cursor: pointer;
        }
        
        .cluster_control_left img, .cluster_control_right img
        {
            vertical-align: top;
        }
        
        .cluster_control_left
        {
            left: 0px;
            padding-right: 16px;
        }
        
        .cluster_control_right
        {
            right: 0px;
            text-align: right;
            padding-left: 16px;
        }
        
        .cluster_scroll_area
        {
            position: relative;
            left: 0px;
        }
        
        #home_main_cluster
        {
            margin-bottom: 7px;
        }
        
        #main_cluster_control_ctn
        {
            height: 43px;
            padding-bottom: 10px;
        }
        
        .cluster_capsule
        {
            display: block;
            float: left;
            position: relative;
        }
        
        a.cluster_capsule:hover
        {
            text-decoration: none;
        }
        
        div.slider
        {
            height: 13px;
            position: relative;
            background-color: #b2b2b2;
        }
        
        div.slider div.handle
        {
            position: absolute;
            top: 0px;
            width: 60px;
            height: 13px;
            cursor: pointer;
            background-image: url( App_Themes/Padrao/imagens/masterPage/control_slider.png );
            background-repeat: no-repeat;
            background-position: left;
        }
        
        div.slider div.handle:hover
        {
            background-position: right;
        }
        
        #main_cluster_control_ctn div.slider
        {
            width: 600px;
        }
        
        .bannerCatalogo
        {
            display: block;
            max-width: 651px;
            height: 64px;
            
            border: 1px solid #000;
            padding: 18px 8px;
            
            background: url('App_Themes/Padrao/imagens/masterPage/bgBannerCatalogo.jpg') no-repeat;
            font-family: "Trebuchet MS" , Calibri, Arial, Sans-Serif;
            font-size: 24px;
            font-weight: bold;
            text-decoration: none;
            color: #fff;
        }
        .bannerCatalogo span
        {
            display: block;
            width: 420px;
            float: right;
            text-align: left;
        }
    </style>
    <script type="text/javascript">

        function ShowWithFade(elem) {
            var elem = $(elem);

            if (!elem.visible() || elem.hiding) {
                elem.hiding = false;
                if (elem.effect)
                    elem.effect.cancel();

                if (Prototype.Browser.IE) {
                    elem.addClassName('suppress_shadow');
                    elem.effect = new Effect.Appear(elem, { duration: 0.2, afterFinish: function () { elem.removeClassName('suppress_shadow'); } });
                }
                else {
                    elem.effect = new Effect.Appear(elem, { duration: 0.2 });
                }
            }
        }

        function HideWithFade(elem) {
            var elem = $(elem);

            if (elem.visible() && !elem.hiding) {
                if (elem.effect && !elem.hiding)
                    elem.effect.cancel();
                elem.hiding = true;

                if (Prototype.Browser.IE) {
                    elem.addClassName('suppress_shadow');
                }
                elem.effect = new Effect.Fade(elem, { duration: 0.2 });
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table border="0" cellpadding="2" cellspacing="0" width="100%">
                <tr>
                    <td align="left" valign="top">
                        <uc2:Categorias ID="Categorias" runat="server" />
                        <br />
                        <uc1:Noticias ID="Noticias" runat="server" />
                    </td>
                    <td align="right" valign="top">
                        <uc3:Destaques ID="Destaques" runat="server" />
                        <br />
                        <asp:LinkButton runat="server" CssClass="bannerCatalogo" href="http://www.deoplasticos.com.br/catalogo/"
                            target="_blank">
                            <span>
                                Clique aqui para visualizar nosso catálogo de produtos.
                            </span>
                        </asp:LinkButton><br />
                        <div style="border: solid 1px Blue; text-align: left; padding-bottom: 5px;">
                            <asp:Literal ID="LiteralHome" runat="server"></asp:Literal>
                        </div>
                        <br />
                        <div style="border: solid 1px Gray; float: left; text-align: left; margin-bottom: 5px;
                            padding: 5px 10px 5px 10px;">
                            <table width="630px">
                                <tr>
                                    <td align="left" style="font-family: Arial Black;">
                                        Buscar no site:
                                        <asp:TextBox ID="TextBoxBusca" runat="server" Width="200" OnTextChanged="btBusca_Click"></asp:TextBox>
                                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="TextBoxBusca"
                                            WatermarkText="Escreva aqui o que deseja procurar em nosso site" WatermarkCssClass="waterMark" />
                                        <asp:ImageButton ID="btBusca" runat="server" Width="24" Height="24" ImageUrl="~/App_Themes/Padrao/imagens/masterPage/page_search.png"
                                            ImageAlign="Bottom" ToolTip="Clique aqui para executar a procura." OnClick="btBusca_Click" />
                                    </td>
                                    <td align="right" style="font-family: Arial Black; border-left: solid 1px blue;">
                                        Download de Arquivos:
                                        <asp:ImageButton ID="btDown" runat="server" Width="24" Height="24" ImageUrl="~/App_Themes/Padrao/imagens/masterPage/folder_down.png"
                                            ImageAlign="Bottom" ToolTip="Clique aqui para baixar arquivos disponíveis para baixar."
                                            OnClick="btDown_Click" />
                                    </td>
                                </tr>
                            </table>
                            <asp:Panel ID="PanelResultadoProcura" runat="server">
                                <hr />
                                <asp:Repeater ID="RepeaterDownload" runat="server">
                                    <HeaderTemplate>
                                        <table border="0" cellpadding="0" cellspacing="3" width="100%">
                                            <tr>
                                                <td colspan="3" style="border-bottom: solid 1px blue;">
                                                    Arquivos para Download:
                                                </td>
                                            </tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <tr>
                                            <td valign="top" style="font-size: small; width: 200px;">
                                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "~/GetFile.aspx?idDocumento="+ Eval("IdDocumento")%>'
                                                    Style="font-weight: bold; font-size: medium;">
                                                <%# Eval("NomeArquivo")%>
                                                </asp:HyperLink><br />
                                            </td>
                                            <td align="right" style="width: 100px;">
                                                <%# int.Parse(Eval("TamanhoArquivo").ToString())/1024%>
                                                KB
                                            </td>
                                            <td style="font-size: small;">
                                                <%# Eval("Comentario")%>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </table>
                                        <br />
                                        <br />
                                    </FooterTemplate>
                                </asp:Repeater>
                                <asp:Repeater ID="RepeaterNoticia" runat="server">
                                    <HeaderTemplate>
                                        <table border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td style="border-bottom: solid 1px blue;">
                                                    Noticias:
                                                </td>
                                            </tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <tr>
                                            <td valign="top" style="font-size: small;">
                                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "~/Noticia.aspx?idNoticia="+ Eval("idNoticia")%>'
                                                    Style="color: Black; font-size: medium;">
                                                <%# ((DateTime)Eval("DataVigenciaInicio")).ToString("dd.MM") %> - <%# Eval("Titulo")%>
                                                </asp:HyperLink><br />
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </table>
                                        <br />
                                        <br />
                                    </FooterTemplate>
                                </asp:Repeater>
                                <asp:Repeater ID="RepeaterFamilia" runat="server">
                                    <HeaderTemplate>
                                        <table border="0" cellpadding="0" cellspacing="3">
                                            <tr>
                                                <td colspan="4" style="border-bottom: solid 1px blue;">
                                                    Familia de produtos:
                                                </td>
                                            </tr>
                                            <tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <%# (Container.ItemIndex!=0 && Container.ItemIndex%4==0?"</tr><tr>":"") %>
                                        <td align="center" valign="top" style="font-family: Arial Black; font-size: x-small;">
                                            <div style="width: 150px;">
                                                <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%#"~/ProdutosSubFamilia.aspx?idFamilia="+Eval("idFamilia") %>'
                                                    ForeColor="#3b2194">
                                                    <%# DataBinder.Eval(Container.DataItem,"familia").ToString().ToUpper() %><br />
                                                    <asp:Image runat="server" Style="max-width: 100px; max-height: 100px;"
                                                        ImageUrl='<%#"~/DownFamilia.aspx?idFamilia="+Eval("idFamilia") %>' />
                                                </asp:HyperLink>
                                            </div>
                                            <br />
                                        </td>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </tr> </table>
                                    </FooterTemplate>
                                </asp:Repeater>
                                <asp:Repeater ID="RepeaterSubFamilia" runat="server">
                                    <HeaderTemplate>
                                        <table border="0" cellpadding="0" cellspacing="3">
                                            <tr>
                                                <td colspan="4" style="border-bottom: solid 1px blue;">
                                                    Sub-Familia de produtos:
                                                </td>
                                            </tr>
                                            <tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <%# (Container.ItemIndex!=0 && Container.ItemIndex%4==0?"</tr><tr>":"") %>
                                        <td align="center" valign="top" style="font-family: Arial Black; font-size: small;">
                                            <div style="width: 150px;">
                                                <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%#"~/ProdutosSubFamilia.aspx?idSubFamilia="+Eval("idSubFamilia") %>'
                                                    ForeColor="#3b2194">
                                                    <%# DataBinder.Eval(Container.DataItem,"subFamilia").ToString().ToUpper() %><br />
                                                    <asp:Image runat="server" Style="max-width: 100px; max-height: 100px;"
                                                        ImageUrl='<%#"~/DownSubFamilia.aspx?idSubFamilia="+Eval("idSubFamilia") %>' />
                                                </asp:HyperLink>
                                            </div>
                                            <br />
                                        </td>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </tr> </table>
                                    </FooterTemplate>
                                </asp:Repeater>
                                <asp:Repeater ID="RepeaterProdutos" runat="server">
                                    <HeaderTemplate>
                                        <table border="0" cellpadding="0" cellspacing="3">
                                            <tr>
                                                <td colspan="4" style="border-bottom: solid 1px blue;">
                                                    Produtos:
                                                </td>
                                            </tr>
                                            <tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <%# (Container.ItemIndex!=0 && Container.ItemIndex%4==0?"</tr><tr>":"") %>
                                        <td align="center" valign="top" style="font-family: Arial Black; font-size: small;">
                                            <div style="width: 150px;">
                                                <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%#"~/ProdutosSubFamilia.aspx?idProduto="+Eval("idProduto") %>'
                                                    ForeColor="#3b2194">
                                                    <%# DataBinder.Eval(Container.DataItem,"produto").ToString().ToUpper() %><br />
                                                    <asp:Image runat="server" Style="max-width: 100px; max-height: 100px;"
                                                        ImageUrl='<%#"~/DownProduto.aspx?idProduto="+Eval("idProduto") %>' />
                                                </asp:HyperLink>
                                            </div>
                                            <br />
                                        </td>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </tr> </table>
                                    </FooterTemplate>
                                </asp:Repeater>
                            </asp:Panel>
                        </div>
                    </td>
                </tr>
            </table>
            <br />
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:Panel ID="PanelPagSeguro" runat="server" Visible="false">
        <div style="position: fixed; top: 0; left: 0; background-color: Gray; filter: alpha(opacity=50);
            opacity: .5; width: 100%; height: 100%; vertical-align: middle; text-align: center;">
        </div>
        <div style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; font-size: medium;
            font-weight: bold;">
            <table style="width: 100%; height: 100%;">
                <tr>
                    <td style="text-align: center; vertical-align: middle;">
                        <center>
                            <asp:Table ID="Table1" runat="server" CellPadding="0" CellSpacing="0">
                                <asp:TableRow>
                                    <asp:TableCell HorizontalAlign="Right">
                                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/App_Themes/Padrao/imagens/masterPage/fechar.png"
                                            OnClick="ButtonClosePagSeguro_Click" />
                                    </asp:TableCell>
                                </asp:TableRow>
                                <asp:TableRow ID="tbrow" runat="server">
                                    <asp:TableCell ID="tbcell" runat="server" BackColor="#707070" Style="vertical-align: middle;
                                        text-align: center; padding: 5px 10px 5px 10px;">
                                        <center>
                                            <div style="background-color: White;">
                                                <br />
                                                Prezado cliente, consta(m) d&eacute;bito(s) em aberto em nosso departamento de cobran&ccedil;a:<br />
                                                <br />
                                                <asp:Literal ID="ltCobranca" runat="server" Text=""></asp:Literal><br />
                                                <hr />
                                                Se desejar, poder&aacute; efetuar o pagamento online com diversas formas de pagamento
                                                clicando na imagem abaixo.<br />
                                                Obrigado!
                                                <br />
                                                <br />
                                                <cc1:VendaPagSeguro ID="VendaPagSeguro1" runat="server">
                                                </cc1:VendaPagSeguro>
                                                <center>
                                                    <asp:ImageButton runat="server" ImageUrl="~/App_Themes/Padrao/imagens/pagSeguro/btnWebprefC.gif"
                                                        OnClick="btnPagSeguro_Click" ToolTip="Pague com PagSeguro - &eacute; r&aacute;pido, gr&aacute;tis e seguro!" />
                                                    <asp:ImageButton ID="btnPagSeguro" runat="server" ImageUrl="~/App_Themes/Padrao/imagens/pagSeguro/btnPagueComBR.jpg"
                                                        OnClick="btnPagSeguro_Click" ToolTip="Pague com PagSeguro - &eacute; r&aacute;pido, gr&aacute;tis e seguro!" />
                                                </center>
                                                <br />
                                            </div>
                                    </asp:TableCell>
                                </asp:TableRow>
                            </asp:Table>
                            <asp:RoundedCornersExtender ID="RoundedCornersExtender2" runat="server" TargetControlID="tbcell"
                                Radius="8">
                            </asp:RoundedCornersExtender>
                        </center>
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
    <asp:Panel ID="PanelPagSeguroAndamento" runat="server" Visible="false">
        <div style="position: fixed; top: 0; left: 0; background-color: Gray; filter: alpha(opacity=50);
            opacity: .5; width: 100%; height: 100%; vertical-align: middle; text-align: center;">
        </div>
        <div style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; font-size: medium;
            font-weight: bold;">
            <table style="width: 100%; height: 100%;">
                <tr>
                    <td style="text-align: center; vertical-align: middle;">
                        <center>
                            <asp:Table ID="Table2" runat="server" CellPadding="0" CellSpacing="0">
                                <asp:TableRow>
                                    <asp:TableCell HorizontalAlign="Right">
                                        <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/App_Themes/Padrao/imagens/masterPage/fechar.png"
                                            OnClick="ButtonClosePagSeguro_Click" />
                                    </asp:TableCell>
                                </asp:TableRow>
                                <asp:TableRow ID="TableRow1" runat="server">
                                    <asp:TableCell ID="TableCell1" runat="server" BackColor="#707070" Style="vertical-align: middle;
                                        text-align: center; padding: 5px 10px 5px 10px;">
                                        <center>
                                            <div style="background-color: White;">
                                                <br />
                                                Prezado cliente, consta(m) os seguintes d&eacute;bito(s) em andamento junto ao Pag-Seguro:<br />
                                                <br />
                                                <asp:Literal ID="ltPagSeguro" runat="server" Text=""></asp:Literal><br />
                                                <br />
                                                Obrigado!
                                                <br />
                                            </div>
                                    </asp:TableCell>
                                </asp:TableRow>
                            </asp:Table>
                            <asp:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID="tbcell"
                                Radius="8">
                            </asp:RoundedCornersExtender>
                        </center>
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
</asp:Content>
